package Interface

import (
	"github.com/golang/protobuf/proto"
	"server5/protobuf"
)

type IGameRoom interface {
	//开始游戏
	StartGame()
	//给客户端发送初始化游戏数据
	InitGame(player IPlayer)
	//房间内广播消息
	Broadcast(msgType protobuf.MsgType,message proto.Message)
	//购买单位
	BuyUnit(request IRequest)
	//游戏结束
	GameOver(RedIsWin bool)
	MoveUnit(request IRequest)

	Player(user IUser) IPlayer
	RemoveUnit(unitId int32)
	AddUnit(unit IUnit)
	GetUnit(unitId int32) IUnit
	AttackUnit(request IRequest)
	UpStronghold(request IRequest)

	OccupyStronghold(request IRequest)
	CancelOccupyStronghold(request IRequest)
	RequestChan() chan IRequest
	Units() map[int32]IUnit
}